package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import one.stand.dto.PageResponse2;

import java.util.List;

@Data
@Builder
public class SupplierDynamicResponse {

    @ApiModelProperty(value = "列表", dataType = "SupplierDynamicResponse.Dynamic")
    private PageResponse2<Dynamic> dynamics;

    @ApiModel("SupplierDynamicResponse.Dynamic")
    @Data
    @Builder
    public static class Dynamic {
        @ApiModelProperty("动态id")
        private Integer dynamicId;

        @ApiModelProperty("发布时间(时间戳 毫秒;显示: 当天1小时内(如10分钟) 当天1小时外(如3小时) 不是当天(如09-08)")
        private long time;
        @ApiModelProperty("类型:1文章 2动态")
        private Integer type;
        @ApiModelProperty("标题")
        private String title;
        @ApiModelProperty("图片")
        private String photos;

        @ApiModelProperty("评论人数")
        private Integer commentNum;
        @ApiModelProperty("点赞人数")
        private Integer doThumbsNum;
        @ApiModelProperty("是否点赞：0无 1已点赞")
        private Integer thumbsFlag;

        @ApiModelProperty(value = "评论列表", dataType = "SupplierDynamicResponse.Comment")
        private List<Comment> commentList;
    }

    @ApiModel("SupplierDynamicResponse.Comment")
    @Data
    @Builder
    public static class Comment {
        @ApiModelProperty("评论ID")
        private Integer commentId;
        @ApiModelProperty("评论人名")
        private String userName;
        @ApiModelProperty("回复人名(可能为无)")
        private String replyUserName;
        @ApiModelProperty("评论内容")
        private String content;
    }
}